// 当前代码运行的环境
const IS_DEV_ENV = process.env.NODE_ENV === 'development';
const IS_TEST_ENV = process.env.NODE_ENV === 'test';
const IS_PROD_ENV = process.env.NODE_ENV === 'production';

// 服务器地址配置
let HOST_CIRCLE, HOST_MISSION, HOST_MONEY;
if (IS_DEV_ENV) {
    HOST_CIRCLE = 'http://172.16.1.95:8080/api/circle';
    HOST_MONEY = 'http://172.16.1.95:8080/api/money';
    HOST_MISSION = 'http://172.16.1.95:8080/api/mission';
}
if (IS_TEST_ENV) {
    HOST_CIRCLE = 'https://circle-test1.qiushibaike.com';
    HOST_MONEY = 'https://laisee-test1.qiushibaike.com';
    HOST_MISSION = 'https://mission-test1.qiushibaike.com';
}
if (IS_PROD_ENV) {
    HOST_CIRCLE = 'https://circle.qiushibaike.com';
    HOST_MONEY = 'https://laisee.qiushibaike.com';
    HOST_MISSION = 'https://mission.qiushibaike.com';
}

// 请求地址
const XHR_REQ_URL = {
    FORTUNE_LIST: '/user/fortune',
    FORTUNE_VOTE: '/fortune/vote',
    SIGN_MONTH_RECORD: '/user/sign/record',
    SIGNIN: '/user/sign',
    SIGNIN_CONTINUE_DAYS_AFTER_USE_CARD: '/user/sign/supplement/days',
    SIGNIN_USE_CARD: '/user/sign/supplement',
    WALLET_INFO: '/web/wallet/info'
};

// 后端接口返回码
const XHR_RES_CODE = {
    SUCCESS: 0
};

export {
    HOST_CIRCLE,
    HOST_MONEY,
    HOST_MISSION,
    IS_DEV_ENV,
    IS_TEST_ENV,
    IS_PROD_ENV,
    XHR_REQ_URL,
    XHR_RES_CODE
};
